package com.hnkywl.sts.entity.jggl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.sys.Gg;
import com.hnkywl.sts.entity.xsgl.Kh;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created by Melody on 14-3-14.
 */
@Entity
@Table(name = "T_BIZ_JGHJGDMX")
@Where(clause = "deleted!='1'")
public class Jghjgdmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqJghjgdmx", allocationSize = 1, sequenceName = "SEQ_BIZ_JGHJGDMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqJghjgdmx")
    private Long id;

    /**
     * 卡号
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "KH_ID")
    private Kh kh;

    /**
     * 具体物资
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JTWZ_ID")
    private Gg jtwz;

    /**
     * 加工数量
     */
    private Double jg_sbsl = 0d;

    /**
     * 加工重量
     */
    private Double jg_sbzl = 0d;

    /**
     * 备注
     */
    private String bz;

    /**
     * 加工单
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "JGD_ID")
    private Jgd jgd;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Kh getKh() {
        return kh;
    }

    public void setKh(Kh kh) {
        this.kh = kh;
    }

    public Gg getJtwz() {
        return jtwz;
    }

    public void setJtwz(Gg jtwz) {
        this.jtwz = jtwz;
    }

    public Double getJg_sbsl() {
        return jg_sbsl;
    }

    public void setJg_sbsl(Double jg_sbsl) {
        this.jg_sbsl = jg_sbsl;
    }

    public Double getJg_sbzl() {
        return jg_sbzl;
    }

    public void setJg_sbzl(Double jg_sbzl) {
        this.jg_sbzl = jg_sbzl;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Jgd getJgd() {
        return jgd;
    }

    public void setJgd(Jgd jgd) {
        this.jgd = jgd;
    }
}
